package com.chalmers.foa.gamemodel.gameobjects.effects;

import android.graphics.Point;
import android.graphics.RectF;

import com.chalmers.foa.gamemodel.gameobjects.GameObjectAdapter;

public abstract class ParticleAdapter {
	
	private int color;
	private Point size;
	private RectF rect;
	private Point position;
	private int width,height;
	
	public ParticleAdapter(int _color,Point _size,Point position){
		this.position = position;
		rect= new RectF();
		setSize(_size);
		setColor(_color);
	}
	
	public RectF getRect(){
		rect.set(position.x,position.y,
				(position.x+width),(this.position.y+height));
		return rect;
	}
	
	public int getColor(){
		return color;
	}

	public void setSize(Point _size){
		size = _size;
		this.width = size.x;
		this.height = size.y;
	}
	private void setColor(int _color){
		color = _color;
	}
	public Point getPosition(){
		return position;
	}
	public void setPosition(Point _position){
		position.set(_position.x, _position.y);
	}
	protected void translate(Point offset){
		position.x += offset.x;
		position.y += offset.y;
	}
	public int getHeight(){
		return height;
	}
	public int getWidth(){
		return width;
	}
	
}
